<?php

class BaseModeldto {
  public $id;
  private $obj;
  
  function __construct($obj) {    
    $class = get_class($this);
    $properties = array_keys(get_class_vars($class));
    foreach($properties as $property) {
      $this->$property = $obj->$property;
    }
    $this->obj=$obj;
    $this->resolveRelations();
  }
  
  
  function resolveRelations() {
  
  }
  
  function getModel() {
    return $this->obj;
  }
}